home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / intrfc55.arc / NAMETYPE.PAS < prev    next >
Pascal/Delphi Source File  |  1990-02-25  |  2KB  |  92 lines

  1. unit nametype;
  2.  
  3. { Unit of type/const definitions for namelist unit }
  4.  
  5. interface
  6. type
  7.   type_def_ptr = ^type_def_rec;
  8.   type_def_rec = record
  9.     type_type : byte;
  10.     other_byte : byte;
  11.     size : word;
  12.     case integer of
  13.     1 : ( element_ofs,element_unit,index_ofs,index_unit: word );
  14.     2 : ( hash_ofs, first_ofs :word;
  15.   {3}     parent_ofs, parent_unit, vmt_size :word;
  16.   {3}     handle,w7,self_type_ofs : word );
  17.     7 : ( base_ofs,base_unit:word );
  18.     6 : ( return_ofs,return_unit,num_args:word );
  19.     8 : ( target_ofs,target_unit:word );
  20.    15 : ( lower,upper : longint;
  21.           type_ofs,type_unit:word
  22.         );
  23.    -1 : ( who_knows : array[3..8] of word
  24.         );
  25.   end;
  26.  
  27.   type_info_ptr = ^type_info_rec;
  28.   type_info_rec = record
  29.     type_def_ofs,type_unit : word;
  30.   end;
  31.  
  32.   var_info_ptr = ^var_info_rec;
  33.   var_info_rec = record
  34.     c_or_v:byte;  { 0 = var, 1 = typed const }
  35.     offset,  { within the appropriate section }
  36.     in_unit, { either unit number if absolute, or data block number }
  37.     type_def_ofs,type_unit : word;
  38.   end;
  39.  
  40.   const_info_ptr = ^const_info_rec;
  41.   const_info_rec = record
  42.     type_def_ofs,type_unit : word;
  43.     case integer of
  44.     0:  (intval:longint);
  45.     1:  (realval:real);    { never used? }
  46.     2:  (stringval:string);
  47.     3:  (extendval:extended);
  48.     4:  (boolval:boolean);
  49.     end;
  50.  
  51.   arg_ptr = ^arg_rec;
  52.   arg_rec = record
  53.     type_def_ofs,type_unit : word;
  54.     var_or_val : byte;    {  2=by value, 6=by reference, i.e. var  }
  55.   end;
  56.  
  57.   func_type_ptr = ^func_type_rec;
  58.   func_type_rec = record
  59.     type_def_ofs,type_unit,num_args : word;
  60.   end;
  61.  
  62.   code_flags = set of (far_entry,inline_code,f4,external_code,method,construct,
  63.                        destruct,f128);
  64.  
  65.   func_info_ptr = ^func_info_rec;
  66.   func_info_rec = record
  67.     code_type:code_flags;
  68.     entry_ofs,parent_ofs,local_hash,vmt_entry,next_method,w6,w7:word;
  69.     func_type : func_type_rec;
  70.   end;
  71.  
  72.  
  73. const
  74.   record_id   =  2;
  75.   object_id   =  3;
  76.   const_id    = 80;
  77.   type_id     = 81;
  78.   var_id      = 82;
  79.   proc_id     = 83;
  80.   sys_proc_id = 84;
  81.   sys_fn_id   = 85;
  82.   sys_new_id  = 86;
  83.   sys_port_id = 87;
  84.   sys_mem_id  = 88;
  85.   unit_id     = 89;
  86.   init_id     = 128;   { Just hope that these haven't already been taken! }
  87.   uses_id     = 129;
  88.   local_id    = 130;
  89.   referenced_id = 131;
  90.  
  91. implementation
  92. end.